﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using System.Data;
using Models;

namespace BLL
{
  public   class MenuReservationBLL
    {
        MenuReservationDAL md = new MenuReservationDAL();
        public int Addtxt(string text)
        {
            return md.Addtxt(text);

        }
        public DataTable getall()
        {
            return md.getall();
        }


        public int getCState(string OrderId)
        {
            return md.getCState( OrderId);
        }







        public DataTable getcbReservation()
        {
            return md.getcbReservation();
        }
        public DataTable Notorder()
        {
            return md.Notorder();
        }
        public DataSet getTimeState(string sdmc ,string openid,string canteenss)
        {
            return md.getTimeState(sdmc, openid, canteenss);
        }

        public DataTable MeunumberCount(string onsaleid)
        {
            return md.MeunumberCount(onsaleid);
        }
        public DataTable MeunumberCount01(string onsaleid)
        {
            return md.MeunumberCount01(onsaleid);
        }
        public string getcount(string seldate_dummy, string canteen, string TimeStateId, string openid)
        {
            return md.getcount(seldate_dummy, canteen, TimeStateId, openid);
        }

        public string getcount01(string seldate_dummy, string canteen, string TimeStateId, string openid)
        {
            return md.getcount01(seldate_dummy, canteen, TimeStateId, openid);
        }
        public DataTable MeuListOrder(string order)
        {
            return md.MeuListOrder(order);
        }
        public string GetOrderlist_Count(string Orderid, string canteen,string Time)
        {
            return md.GetOrderlist_Count(Orderid, canteen, Time);
        }
        public string Update_Orderlist(string Orderid, string meals_Orderid)
        {
            return md.Update_Orderlist(Orderid, meals_Orderid);
        }

        public DataTable getMenuList(string TimeStateId,string rq,string canteen, string FoodCategoryId,string Trade_name)
        {
            return md.getMenuList(TimeStateId,rq, canteen, FoodCategoryId, Trade_name);
        }


        public DataSet getCanteen( string openid_canteen)
        {
            return md.getCanteen(openid_canteen);
        }

        public DataSet getFoodCategoryTwo(string openid_canteen)
        {
            return md.getFoodCategoryTwo(openid_canteen);
        }
        public DataTable   getOrderList(string State,string ryids,string types)
        {
            return md.getOrderList(State, ryids, types);

        }
        public DataTable getMenuName(string name)
        {
            return md.getMenuName(name);
        }
        public DataTable getStateID(string name)
        {
            return md.getStateID(name);
        }
        public  int AddOrderDetail(OrderDetail od)
        {
            return md.AddOrderDetail(od);
        }
        public int AddOrderList(OrderList ol)
        {
            return md.AddOrderList(ol);
        }
        public DataTable getryid(string openid)
        {
            return md.getryid(openid);
        }
        public DataTable getryye(string oederIds)
        {
            return md.getryye(oederIds);
        }
        public int updateOrderList(string PayTime, string payType, string orderid, string address,string address2, string telnum)
        {
            return md.updateOrderList(PayTime, payType, orderid,address, address2, telnum);
        }

        public int updateMenulist(int Num, string MenuId, string OnSaleIdm, string canteen)
        {
            return md.updateMenulist(Num, MenuId, OnSaleIdm, canteen);
        }

        //微信支付插入电话和地址
        public int updateOrderList2(string PayTime, string payType, string orderid, string address,string address2, string telnum)
        {
            return md.updateOrderList2(PayTime, payType, orderid, address, address2, telnum);
        }

        public int updateOrderList3(string PayTime, string payType, string orderid, string address, string telnum)
        {
            return md.updateOrderList3(PayTime, payType, orderid, address, telnum);
        }


        public static int updateryxx(string orderid, string price,string  jfzt)
        {
            return MenuReservationDAL.updateryxx(orderid, price, jfzt);
        }

        //查询余额
        public static DataTable Select_CUST_ID(string rfkh)
        {
            return MenuReservationDAL.Select_CUST_ID(rfkh);
        }
        public static DataTable Get_BUSINESS_ID(string jh)
        {
            return MenuReservationDAL.Get_BUSINESS_ID(jh);
        }


        //public int updateaddress(string orderid, string address)
        //{
        //    return md.updateaddress(orderid, address);
        //}




        public DataTable getpayType(string oederid)
        {
            return md.getpayType(oederid);
        }
            public int reservation(string oederIds, string price, string payTime)
        {
            return md.reservation(oederIds, price, payTime);
        }
        public int  Refund(string OR)
        {
            return md.Refund(OR);
        }

        public string GetZt(string OR)
        {
            return md.GetZt(OR);
        }
        public DataSet SelAddsdTime(string oederIds)
        {
            return md.SelAddsdTime(oederIds);
        }

        public DataTable Select_CUST_ID01(string oederid)
        {
            return md.Select_CUST_ID01(oederid);
        }
        public string GetOrderList(string oederid)
        {
            return md.GetOrderList(oederid);
        }


            public int menulistNum(string OnSaleId, int OrderNum, string canteen)
        {
            return md.menulistNum(OnSaleId, OrderNum, canteen);
        }
        //退款金额
        public int Refundmode(string OR)
	{
	    return md.Refundmode(OR);
	}
    }
}
